
package cartagows.wsframework.wssecurity.core;

import java.io.Serializable;

import javax.security.auth.callback.CallbackHandler;

import cartagows.wsframework.core.IOperationContent;


public class SecurityInfo  implements IOperationContent, Serializable{

	private static final long serialVersionUID = 1L;

	private String utUsername;
	private String utPassword;
	private String encryptionUser;
	private String signatureUser;
	private String signatureDecryptionPassword;
	private String cryptoEncProperties;
	private String cryptoDecProperties;
	private CallbackHandler pwdCallback;

	public SecurityInfo(UsernameTokenInfo ut, MessageProtectionInfo protectionInfo){

		this.utUsername = ut.getUsername();
		this.utPassword = ut.getPassword();
		this.encryptionUser = protectionInfo.getEncryptionUser();
		this.signatureUser = protectionInfo.getSignatureUser();
		this.signatureDecryptionPassword = protectionInfo.getSignatureDecryptionPassword();
		this.cryptoEncProperties = protectionInfo.getCryptoEncProperties();
		this.cryptoDecProperties = protectionInfo.getCryptoDecProperties();
		this.pwdCallback = protectionInfo.getPwdCallback();
	}

	public SecurityInfo(MessageProtectionInfo protectionInfo){

		this.encryptionUser = protectionInfo.getEncryptionUser();
		this.signatureUser = protectionInfo.getSignatureUser();
		this.signatureDecryptionPassword = protectionInfo.getSignatureDecryptionPassword();
		this.cryptoEncProperties = protectionInfo.getCryptoEncProperties();
		this.cryptoDecProperties = protectionInfo.getCryptoDecProperties();
		this.pwdCallback = protectionInfo.getPwdCallback();
	}

	public String getUtUsername() {
		return utUsername;
	}

	public String getUtPassword() {
		return utPassword;
	}

	public String getEncryptionUser() {
		return encryptionUser;
	}

	public String getSignatureUser() {
		return signatureUser;
	}

	public String getSignatureDecryptionPassword() {
		return signatureDecryptionPassword;
	}

	public String getCryptoEncProperties() {
		return cryptoEncProperties;
	}

	public String getCryptoDecProperties() {
		return cryptoDecProperties;
	}

	public CallbackHandler getPwdCallback() {
		return pwdCallback;
	}    

}